package com.alibaba.dubbo.dynamic.config;

import java.io.Serializable;

/**
 * Created by wuyu on 2016/8/8.
 */
public class DynamicExportConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    //bean id
    private String id;

    private String protocol = "dubbo";

    //接口名称
    private String interfaceName;

    //实现类名称
    private String serviceName;


    //发布组
    private String group;

    //发布版本
    private String version;

    //超时
    private Integer timeout;

    //过滤器
    private String filter;


    //是否使用新的classloader
    private boolean renewClassLoader = false;

    public boolean isRenewClassLoader() {
        return renewClassLoader;
    }

    public void setRenewClassLoader(boolean renewClassLoader) {
        this.renewClassLoader = renewClassLoader;
    }


    public String getId() {
        return id;
    }

    public DynamicExportConfig setId(String id) {
        this.id = id;
        return this;
    }


    public String getGroup() {
        return group;
    }

    public DynamicExportConfig setGroup(String group) {
        this.group = group;
        return this;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public DynamicExportConfig setTimeout(Integer timeout) {
        this.timeout = timeout;
        return this;
    }

    public String getFilter() {
        return filter;
    }

    public DynamicExportConfig setFilter(String filter) {
        this.filter = filter;
        return this;
    }

    public DynamicExportConfig() {
    }


    public String getInterfaceName() {
        return interfaceName;
    }

    public void setInterfaceName(String interfaceName) {
        this.interfaceName = interfaceName;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public DynamicExportConfig(String id, String protocol, String interfaceName, String serviceName, String group, String version, Integer timeout, String filter, boolean renewClassLoader) {
        this.id = id;
        this.protocol = protocol;
        this.interfaceName = interfaceName;
        this.serviceName = serviceName;
        this.group = group;
        this.version = version;
        this.timeout = timeout;
        this.filter = filter;
        this.renewClassLoader = renewClassLoader;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }
}
